;-| AI Commands |----------------------------------------------------------

[Command]
name = "cpu1"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu2"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu3"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu4"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu5"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu6"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu7"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu8"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu9"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu10"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu11"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu12"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu13"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu14"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu15"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu16"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu17"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu18"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu19"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu20"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu21"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu22"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu23"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu24"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu25"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu26"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu27"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu28"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu29"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2


[Command]
name = "cpu30"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu31"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu32"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu33"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu34"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu35"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu36"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu37"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu38"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu39"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

[Command]
name = "cpu40"
command = B+D+F+U,~U,~32222U,a+b+c+x+y+z+s
time = -2

;===================<BUTTON REMAPPING>===================
[Remap]
x = x
y = y
z = z
a = a
b = b
c = c
s = s


;===================<DEFAULT VALUES>===================
[Defaults]
command.time=15
command.buffer.time=1


;===================<SINGLE BUTTON>===================
[Command]
name="a"
command=a
time=1
[Command]
name="b"
command=b
time=1
[Command]
name="c"
command=c
time=1
[Command]
name="x"
command=x
time=1
[Command]
name="y"
command=y
time=1
[Command]
name="z"
command=z
time=1
[Command]
name="start"
command=s
time=1

;===================<HOLD DIR>===================
[Command]
name="holdfwd"
command=/$F
time=1
[Command]
name="holdback"
command=/$B
time=1
[Command]
name="holdup"
command=/$U
time=1
[Command]
name="holddown"
command=/$D
time=1

;===================<HOLD BUTTON>===================
[Command]
name="holda"
command=/a
time=1
[Command]
name="holdb"
command=/b
time=1
[Command]
name="holdc"
command=/c
time=1
[Command]
name="holdx"
command=/x
time=1
[Command]
name="holdy"
command=/y
time=1
[Command]
name="holdz"
command=/z
time=1
[Command]
name="start"
command=/s
time=1

[Command]
name ="forward_c"
command = /$F,c
time = 1

[Command]
name="qcfs"
command=~D,DF,F,s
time=15

[Command]
name="qcfs"
command=~D,DF,F,~s
time=15

;===================<DIR>===================
[command]
name="fwd"
command=F
time=1
[command]
name="back"
command=B
time=1
[command]
name="up"
command=U
time=1
[command]
name="down"
command=D
time=1


;===================<SUPER MOTIONS>===================

[Command]
name = "SFxTKSA"
command = ~D, DF, F, x+y+z
time = 20


[Command]
name="SFxTKCA"
command = ~D, DF, F, b+y
time = 20

;===================<SPECIAL MOTIONS>===================
[Command]
name="BloddyChaos"
command = ~D, DF, F, x

[Command]
name="BloddyChaos"
command = ~D, DF, F, y

[Command]
name="BloddyChaos"
command = ~D, DF, F, z

[Command]
name="BloddyChaosEX"
command = ~D, DF, F, x+y

[Command]
name="BloddyChaosEX"
command = ~D, DF, F, y+z

[Command]
name="BloddyChaosEX"
command = ~D, DF, F, x+z

[Command]
name="CrossCutSaw"
command = B, x

[Command]
name="DoubleSlap"
command = B, y

[Command]
name="BackFlipKick"
command = ~D, DB, B, a

[Command]
name="BackFlipKick"
command = ~D, DB, B, b

[Command]
name="BackFlipKick"
command = ~D, DB, B, c

[Command]
name="BackFlipKickEX"
command = ~D, DB, B, a+b

[Command]
name="BackFlipKickEX"
command = ~D, DB, B, b+c

[Command]
name="BackFlipKickEX"
command = ~D, DB, B, a+c

;===================<OTHER>===================

[command]
name="superjump"
command=$D,$U
time=15

;---------------------------------------------------------------------------
; Tag System beta: Basado en Tekken Tag
; --------------

;Tekken Tag System beta
[Command]
name = "Tag"
command = c+z
time = 10

;===================<DOUBLE TAP>===================
[Command]
name="FF"
command=F,F
time=10
[Command]
name="BB"
command=B,B
time=10


;===================<2/3 BUTTON COMBINATION>===================
[Command]
name="recovery"
command=x+y
time=1
[Command]
name="recovery"
command=x+z
time=1
[Command]
name="recovery"
command=y+z
time=1

[Command]
name="2k"
command=a+b
time=1
[Command]
name="2k"
command=a+c
time=1
[Command]
name="2k"
command=b+c
time=1

[Command]
name="2p"
command=x+y
time=1
[Command]
name="2p"
command=x+z
time=1
[Command]
name="2p"
command=y+z
time=1

[Command]
name="excelcombo"
command=c+z
time=1

[Command]
name="roll"
command=a+x
time=1

[Command]
name = "Throw"
command = command=/$F,z
time = 1

;===========================================================================
;===============================<-1 STATES>=================================
;===========================================================================
[Statedef -1]

[State -1, AIhelper]
type=changestate
trigger1=ishelper(9741)
value=9741



;***********************************************
;SFxTK Super Arts:
[State -1]
type = ChangeState
value = 3100
triggerall = command = "SFxTKSA"
triggerall = power >= 1000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = hitdefattr = SC, NA, SA, HA
trigger2 = stateno != [3050,3100)
trigger2 = movecontact

;***********************************************
;SFxTK Cross Arts
[State -1]
type = NULL;ChangeState
value = 3200
triggerall = command = "SFxTKCA"
triggerall = power >= 3000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = hitdefattr = SC, NA, SA, HA
trigger2 = stateno != [3050,3100)
trigger2 = movecontact

;***********************************************
;Cross Assault ???
;-------------------------------------------------------------------------------
;***********************************************
;Bloddy Chaos EX
[State -1]
type = ChangeState
value=1005
triggerall=var(59)<=0&&roundstate=2&&command="BloddyChaosEX"&&statetype!=A
triggerall=ifelse(!var(20),!numhelper(1005)&&!numhelper(1025),1)&&!numhelper(1015)&&!numhelper(3005)&&!numhelper(3025)&&!numhelper(3045)&&!numhelper(3055)
triggerall = power >= 500
trigger1=ctrl
trigger2=(stateno=[200,250])&&movecontact
trigger3=movecontact&&var(20)
trigger4=numhelper&&var(20)
trigger4=helper,movecontact

;-------------------------------------------------------------------------------
;Bloddy Chaos
[State -1]
type = ChangeState
value=1000
triggerall=var(59)<=0&&roundstate=2&&command="BloddyChaos"&&statetype!=A
triggerall=ifelse(!var(20),!numhelper(1005)&&!numhelper(1025),1)&&!numhelper(1015)&&!numhelper(3005)&&!numhelper(3025)&&!numhelper(3045)&&!numhelper(3055)
trigger1=ctrl
trigger2=(stateno=[200,250])&&movecontact
trigger3=movecontact&&var(20)
trigger4=numhelper&&var(20)
trigger4=helper,movecontact

;***********************************************
;-------------------------------------------------------------------------------
;Croos Cut Saw
[State -1]
type = ChangeState
value=303
triggerall=var(59)<=0&&roundstate=2&&command="CrossCutSaw"&&statetype!=A
triggerall=ifelse(!var(20),!numhelper(1005)&&!numhelper(1025),1)&&!numhelper(1015)&&!numhelper(3005)&&!numhelper(3025)&&!numhelper(3045)&&!numhelper(3055)
trigger1=ctrl
trigger2=(stateno=[200,250])&&movecontact
trigger3=movecontact&&var(20)
trigger4=numhelper&&var(20)
trigger4=helper,movecontact

;-------------------------------------------------------------------------------
;Double Slap
[State -1]
type = ChangeState
value=306
triggerall=var(59)<=0&&roundstate=2&&command="DoubleSlap"&&statetype!=A
triggerall=ifelse(!var(20),!numhelper(1005)&&!numhelper(1025),1)&&!numhelper(1015)&&!numhelper(3005)&&!numhelper(3025)&&!numhelper(3045)&&!numhelper(3055)
trigger1=ctrl
trigger2=(stateno=[200,250])&&movecontact
trigger3=movecontact&&var(20)
trigger4=numhelper&&var(20)
trigger4=helper,movecontact

;***********************************************
;Back Flip Kick EX
[State -1]
type = ChangeState
value=1015
triggerall=var(59)<=0&&roundstate=2&&command="BackFlipKickEX"&&statetype!=A
triggerall=ifelse(!var(20),!numhelper(1005)&&!numhelper(1025),1)&&!numhelper(1015)&&!numhelper(3005)&&!numhelper(3025)&&!numhelper(3045)&&!numhelper(3055)
triggerall = power >= 500
trigger1=ctrl
trigger2=(stateno=[200,250])&&movecontact
trigger3=movecontact&&var(20)
trigger4=numhelper&&var(20)
trigger4=helper,movecontact
;-------------------------------------------------------------------------------
;Back Flip Kick
[State -1]
type = ChangeState
value=1010
triggerall=var(59)<=0&&roundstate=2&&command="BackFlipKick"&&statetype!=A
triggerall=ifelse(!var(20),!numhelper(1005)&&!numhelper(1025),1)&&!numhelper(1015)&&!numhelper(3005)&&!numhelper(3025)&&!numhelper(3045)&&!numhelper(3055)
trigger1=ctrl
trigger2=(stateno=[200,250])&&movecontact
trigger3=movecontact&&var(20)
trigger4=numhelper&&var(20)
trigger4=helper,movecontact

;***********************************************
;-------------------------------------------------------------------------------

;---------------------------------------------------------------------------
;Pandora Mode XD
[State -1, excelcombo]
type=NULL; changestate
value=760
triggerall=var(59)<=0&&roundstate=2&&(command="excelcombo")&&power>=1000&&!var(20)
trigger1=ctrl

[State -1, run/dash]
type=changestate
value=ifelse(command="FF",102,105)
trigger1=var(59)<=0&&roundstate=2&&(stateno!=[100,106])&&(command="FF"||command="BB")&&statetype=S
trigger1=ctrl

[State -1, roll/dodge]
type = ChangeState
value=ifelse(command="holdfwd",720,710)
triggerall=var(59)<=0&&roundstate=2&&(command="roll")&&statetype!=A
trigger1=ctrl

[State -1, powercharge]
type = ChangeState
value=740
trigger1=var(59)<=0&&roundstate=2&&command="holdb"&&command="holdy"&&statetype!=A&&power<powermax&&ctrl&&!var(20)

;---------------------------------------------------------------------------
;Throw
[State -1, throw]
type = NULL;ChangeState
value=800
trigger1=var(59)<=0&&roundstate=2&&(command="z"||command="y"||command="b"||command="c")&&(command="holdfwd"||command="holdback")
trigger1=statetype=S&&ctrl&&stateno!=100
trigger1=p2statetype!=A&&(p2bodydist x=[0,20])&&(p2dist y=[-100,100])&&p2movetype!=H

;--------------------------------------------------------------------------------------------
[State -1, SLP]
type=changestate
value=200
triggerall=var(59)<=0&&command="x"&&command!="holddown"&&statetype!=A
trigger1=ctrl
trigger2=(stateno=200||stateno=230||stateno=245)&&time>=5
trigger3=movecontact&&(stateno=[200,255])&&var(20)

;---------------------------------------------------------------------------
;
[State -1]
type = ChangeState
value = 206
triggerall = command = "y" && p2bodydist X < 10 && statetype = S
trigger1=ctrl
trigger2=(stateno=200||stateno=230||stateno=245)&&time>=5
trigger3=movecontact&&(stateno=[200,255])&&var(20)

;--------------------------------------------------------------------------------------------
[State -1, SMP]
type=changestate
value=205
triggerall=var(59)<=0&&command="y"&&command!="holddown"&&statetype!=A
trigger1=ctrl
trigger2=movecontact&&(stateno=[200,255])&&var(20)
trigger3= stateno = 200 && movecontact

;---------------------------------------------------------------------------
;
[State -1]
type = ChangeState
value = 210
triggerall = command = "z" && p2bodydist X < 10 && statetype = S
trigger1=ctrl
trigger2=(stateno=200||stateno=230||stateno=245)&&time>=5
trigger3=movecontact&&(stateno=[200,255])&&var(20)

;--------------------------------------------------------------------------------------------
[State -1, SHP]
type=changestate
value=208
triggerall=var(59)<=0&&command="z"&&command!="holddown"&&statetype!=A
trigger1=ctrl
trigger2= stateno = 205 && movecontact

;---------------------------------------------------------------------------
;
[State -1]
type = ChangeState
value = 216
triggerall = command = "a" && p2bodydist X < 10 && statetype = S
trigger1=ctrl
trigger2=(stateno=200||stateno=230||stateno=245)&&time>=5
trigger3=movecontact&&(stateno=[200,255])&&var(20)

;--------------------------------------------------------------------------------------------
[State -1, SLK]
type=changestate
value=215
triggerall=var(59)<=0&&command="a"&&command!="holddown"&&statetype!=A
trigger1=ctrl
trigger2=movecontact&&(stateno=[200,255])&&var(20)

;---------------------------------------------------------------------------
;
[State -1]
type = ChangeState
value = 221
triggerall = command = "b" && p2bodydist X < 10 && statetype = S
trigger1=ctrl
trigger2=(stateno=200||stateno=230||stateno=245)&&time>=5
trigger3=movecontact&&(stateno=[200,255])&&var(20)

;--------------------------------------------------------------------------------------------
[State -1, SMK]
type=changestate
value=220
triggerall=var(59)<=0&&command="b"&&command!="holddown"&&statetype!=A
trigger1=ctrl

;--------------------------------------------------------------------------------------------
[State -1, SHK]
type=changestate
value=225
triggerall=var(59)<=0&&command="c"&&command!="holddown"&&statetype!=A
trigger1=ctrl
trigger2 = stateno = 205 && movecontact

;--------------------------------------------------------------------------------------------
[State -1, CLP]
type=changestate
value=230
triggerall=var(59)<=0&&command="x"&&command="holddown"&&statetype!=A
trigger1=ctrl
trigger2=(stateno=200||stateno=230||stateno=245)&&time>=5
trigger3=movecontact&&(stateno=[200,255])&&var(20)

;--------------------------------------------------------------------------------------------
[State -1, CMP]
type=changestate
value=235
triggerall=var(59)<=0&&command="y"&&command="holddown"&&statetype!=A
trigger1=ctrl
trigger2=movecontact&&(stateno=[200,255])&&var(20)

;--------------------------------------------------------------------------------------------
[State -1, CHP]
type=changestate
value=240
triggerall=var(59)<=0&&command="z"&&command="holddown"&&statetype!=A
trigger1=ctrl
trigger2=movecontact&&(stateno=[200,255])&&var(20)

;--------------------------------------------------------------------------------------------
[State -1, CLK]
type=changestate
value=245
triggerall=var(59)<=0&&command="a"&&command="holddown"&&statetype!=A
trigger1=ctrl
trigger2=(stateno=200||stateno=230||stateno=245)&&time>=5
trigger3=movecontact&&(stateno=[200,255])&&var(20)

;--------------------------------------------------------------------------------------------
[State -1, CMK]
type=changestate
value=250
triggerall=var(59)<=0&&command="b"&&command="holddown"&&statetype!=A
trigger1=ctrl
trigger2=movecontact&&(stateno=[200,255])&&var(20)

;--------------------------------------------------------------------------------------------
[State -1, CHK]
type=changestate
value=255
triggerall=var(59)<=0&&command="c"&&command="holddown"&&statetype!=A
trigger1=ctrl
trigger2=movecontact&&(stateno=[200,255])&&var(20)

;--------------------------------------------------------------------------------------------
[State -1, ALP]
type=changestate
value=260
triggerall=var(59)<=0&&command="x"&&statetype=A
trigger1=ctrl
trigger2=movecontact&&(stateno=[260,285])&&var(20)

;--------------------------------------------------------------------------------------------
[State -1, AMP]
type=changestate
value=265
triggerall=var(59)<=0&&command="y"&&statetype=A
trigger1=ctrl
trigger2=movecontact&&(stateno=[260,285])&&var(20)

;--------------------------------------------------------------------------------------------
[State -1, AHP]
type=changestate
value=270
triggerall=var(59)<=0&&command="z"&&statetype=A
trigger1=ctrl
trigger2=movecontact&&(stateno=[260,285])&&var(20)

;--------------------------------------------------------------------------------------------
[State -1, ALK]
type=changestate
value=275
triggerall=var(59)<=0&&command="a"&&statetype=A
trigger1=ctrl
trigger2=movecontact&&(stateno=[260,285])&&var(20)

;--------------------------------------------------------------------------------------------
[State -1, AMK]
type=changestate
value=280
triggerall=var(59)<=0&&command="b"&&statetype=A
trigger1=ctrl
trigger2=movecontact&&(stateno=[260,285])&&var(20)

;--------------------------------------------------------------------------------------------
[State -1, AHK]
type=changestate
value=285
triggerall=var(59)<=0&&command="c"&&statetype=A
trigger1=ctrl
trigger2=movecontact&&(stateno=[260,285])&&var(20)

;--------------------------------------------------------------------------------------------
[State -1, sparry]
type=hitoverride
triggerall=var(59)<=0&&roundstate=2&&statetype=S
triggerall=command="fwd"&&command!="back"&&command!="up"&&command!="down"
trigger1=ctrl||stateno=700||stateno=701
trigger1=var(21):=1
trigger2=(stateno=[150,153])
trigger2=var(21):=-1
attr=SA,AA,AP
stateno=700
slot=0
time=ifelse((stateno=[150,153]),4,8)

[State -1, cparry]
type=hitoverride
triggerall=var(59)<=0&&roundstate=2&&statetype!=A
triggerall=(statetype=S&&command="down")||(statetype=C&&command="fwd")&&command!="back"&&command!="up"
trigger1=ctrl||stateno=700||stateno=701
trigger1=var(21):=2
trigger2=(stateno=[150,153])
trigger2=var(21):=-2
attr=C,AA,AP
stateno=701
slot=0
time=ifelse((stateno=[150,153]),4,8)

[State -1, aparry]
type=hitoverride
triggerall=var(59)<=0&&roundstate=2&&statetype=A
triggerall=command="fwd"&&command!="back"&&command!="up"&&command!="down"
trigger1=ctrl||stateno=702
trigger1=var(21):=3
trigger2=(stateno=[154,155])
trigger2=var(21):=-3
attr=SA,AA,AP
stateno=702
forceair=1
slot=0
time=ifelse((stateno=[154,155]),4,8)

[State -1, resetparry]
type=hitoverride
trigger1=(statetype=S||statetype=C)&&var(21)!=1&&var(21)!=-1&&var(21)!=2&&var(21)!=-2
trigger2=statetype=A&&var(21)!=3&&var(21)!=-3
trigger3=movetype=A||(movetype=H&&(stateno!=[120,155]))
trigger4=!ctrl
slot=0
time=0

;--------------------------------------------------------------------------------------------
[State -1, taunt]
type=changestate
value=195
triggerall=var(59)<=0&&command="start"&&statetype!=A
trigger1=ctrl
trigger2=(stateno=[200,255])&&movecontact
trigger3=movecontact&&var(20)


;-------------------------------------------------------------------------------
;Dial 1
[State -1]
type = ChangeState
value = 300
triggerall = command = "b" && statetype = S
trigger1 = ctrl
trigger2 = stateno = 215 && movecontact
trigger3 = stateno = 216 && movecontact

;Dial 1
[State -1]
type = ChangeState
value = 301
triggerall = command = "b" && statetype = S
trigger1 = ctrl
trigger2 = stateno = 300 && movecontact

;Dial 1
[State -1]
type = ChangeState
value = 302
triggerall = command = "b" && statetype = S
trigger1 = ctrl
trigger2 = stateno = 301 && movecontact

;-------------------------------------------------------------------------------
;Dial 2
[State -1]
type = ChangeState
value = 304
triggerall = command = "x" && statetype = S
trigger1 = ctrl
trigger2 = stateno = 303 && movecontact

;Dial 2
[State -1]
type = ChangeState
value = 305
triggerall = command = "x" && statetype = S
trigger1 = ctrl
trigger2 = stateno = 304 && movecontact

;-------------------------------------------------------------------------------
;Dial 3
[State -1]
type = ChangeState
value = 307
triggerall = command = "y" && statetype = S
trigger1 = ctrl
trigger2 = stateno = 306 && movecontact

;===========================================================================
;=================================<A.I.>====================================
;===========================================================================

[State -1, AIActivate]
type = VarSet
triggerall = var(59) != 1
triggerall = RoundState != 3
trigger1 = command = "cpu1"
trigger2 = command = "cpu2"
trigger3 = command = "cpu3"
trigger4 = command = "cpu4"
trigger5 = command = "cpu5"
trigger6 = command = "cpu6"
trigger7 = command = "cpu7"
trigger8 = command = "cpu8"
trigger9 = command = "cpu9"
trigger10 = command = "cpu10"
trigger11 = command = "cpu11"
trigger12 = command = "cpu12"
trigger13 = command = "cpu13"
trigger14 = command = "cpu14"
trigger15 = command = "cpu15"
trigger16 = command = "cpu16"
trigger17 = command = "cpu17"
trigger18 = command = "cpu18"
trigger19 = command = "cpu19"
trigger20 = command = "cpu20"
trigger21 = command = "cpu21"
trigger22 = command = "cpu22"
trigger23 = command = "cpu23"
trigger24 = command = "cpu24"
trigger25 = command = "cpu25"
trigger26 = command = "cpu26"
trigger27 = command = "cpu27"
trigger28 = command = "cpu28"
trigger29 = command = "cpu29"
trigger30 = command = "cpu30"
trigger31 = command = "cpu31"
trigger32 = command = "cpu32"
trigger33 = command = "cpu33"
trigger34 = command = "cpu34"
trigger35 = command = "cpu35"
trigger36 = command = "cpu36"
trigger37 = command = "cpu37"
trigger38 = command = "cpu38"
trigger39 = command = "cpu39"
trigger40 = command = "cpu40"
var(59) = 1

[State -1, AI Helper Check]
type = ChangeState
trigger1 = IsHelper(9741)
value = 9741

[State -1, AI Helper Check 2]
type = ChangeState
trigger1 = IsHelper(9742)
value = 9742


[State -1, Standing Parry]
type=hitoverride
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
trigger1= (ctrl && random<75) || ((stateno=[700,701]) && random<333)
trigger1= var(21):=1
attr=SA,AA,AP
stateno=700
slot=0
time=8

[State -1, Crouching Parry]
type=hitoverride
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
trigger1= (ctrl && random<75) || ((stateno=[700,701]) && random<333)
trigger1= var(21):=2
attr=C,AA,AP
stateno=701
slot=0
time=8

[State -1, Air Parry]
type=hitoverride
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype=A
trigger1= (ctrl && random<75) || (stateno=702 && random<333)
trigger1= var(21):=3
attr=SA,AA,AP
stateno=702
forceair=1
slot=0
time=7

[State -1, Reset Parry]
type=hitoverride
trigger1= (!ctrl && (stateno!=[700,702]) && stateno!=5120) || var(20)
trigger2= movetype!=I || (stateno=[100,106])|| (stateno=[120,132])
trigger3= var(59)<=0 && (command="holdback" || command="holdup")
trigger4= (statetype=S || statetype=C) && var(21)!=1 && var(21)!=2
trigger5= statetype=A && var(21)!=3
slot=0
time=0

[State -1, run]
type=changestate
value=102
trigger1= var(59)>=1 && numenemy
trigger1= statetype=S && roundstate=2 && ctrl && random<200
trigger1= (stateno!=[100,105]) && enemynear,movetype!=A && p2bodydist x>120

[State -1, dash]
type=changestate
value=105
triggerall= var(59)>=1 && numenemy
triggerall= statetype=S && roundstate=2 && ctrl
triggerall= (p2bodydist x=[0,80]) && backedgebodydist>80 && (stateno!=[100,105])
trigger1= enemynear,movetype=A && random<50
trigger2= enemynear,stateno=5120 && enemynear,animtime=-3 && random<500

[State -1, Jump]
type=changestate
value=40
trigger1= var(59)>=1 && numenemy
trigger1= roundstate=2 && statetype!=A && ctrl
trigger1= enemynear,movetype=A && p2bodydist x<160 && enemynear,hitdefattr=SC,AT

[State -1, Guard]
type=changestate
value=120
trigger1= var(59)>=1 && numenemy
trigger1= roundstate=2 && inguarddist
trigger1= ctrl && (stateno!=[120,155]) && !var(20)
trigger1= ifelse(statetype=A, (var(9)!=2 || stateno=5210), 1)
trigger1= !(enemynear,hitdefattr=SCA,AT) && (enemynear,time<120)
trigger1= statetype!=A || p2statetype=A
trigger1= random<ifelse((p2stateno=[200,699]), 100, ifelse((p2stateno=[1000,2999]), 333, 1000))

[State -1, jump]
type=changestate
value=40
triggerall=var(59)>=1&&statetype!=A&&roundstate=2&&ctrl
trigger1=ctrl&&p2bodydist x>160&&p2dist y<-100&&random<200
trigger2=enemynear,movetype=A&&p2bodydist x<160&&enemynear,hitdefattr=SC,AT

[State -1, airrecover]
type=changestate
value=ifelse((pos y>=-20),5200,5210)
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && stateno=5050
trigger1= vel y>-1 && alive && canrecover && random<200

[State -1, taunt]
type=changestate
value=195
triggerall= var(59)>=1 && numenemy
triggerall= roundstate=2 && statetype!=A
trigger1= p2dist x>160 && (enemynear,vel y>0) && ctrl && random<100
trigger1= !(enemynear,ctrl) && (enemynear,movetype=H)

;***********************************************
[State -1, SLP]
type=changestate
value=200
triggerall= var(59)>=1 && numenemy
triggerall= statetype!=A && roundstate=2
triggerall= (p2bodydist x=[0,46]) && (p2bodydist y=[-50,50]) && p2statetype!=L && !(enemynear,hitfall)
triggerall= (enemynear,const(size.head.pos.y)<=-40) || (enemynear,statetype=A)
trigger1= ctrl && random<100

[State -1, SMP2]
type=changestate
value=205
triggerall= var(59)>=1 && numenemy
triggerall= statetype!=A && roundstate=2
triggerall= (p2bodydist x=[0,53]) && (p2bodydist y=[-50,50]) && p2statetype=S && !(enemynear,hitfall)
triggerall= (enemynear,const(size.head.pos.y)<=-40) || (enemynear,statetype=A)
trigger1= ctrl && p2statetype=C && random<150
trigger2=prevstateno=200&& movehit

[State -1, SMP]
type=changestate
value=208
triggerall= var(59)>=1 && numenemy
triggerall= statetype!=A && roundstate=2
triggerall= (p2bodydist x=[0,53]) && (p2bodydist y=[-50,50]) && p2statetype=S && !(enemynear,hitfall)
triggerall= (enemynear,const(size.head.pos.y)<=-40) || (enemynear,statetype=A)
trigger1= ctrl && random<75
trigger2=prevstateno=200&&random<150

[State -1, SHP3]
type=changestate
value=208
triggerall= var(59)>=1 && numenemy
triggerall= statetype!=A && roundstate=2
triggerall= (p2bodydist x=[0,60]) && (p2bodydist y=[-50,50]) && (p2statetype=S || p2statetype=C)
triggerall= (enemynear,const(size.head.pos.y)<=-40) || (enemynear,statetype=A)
trigger1= ctrl && random<33

[State -1, SHP2]
type=changestate
value=208
triggerall= var(59)>=1 && numenemy
triggerall= var(1)!=2 && statetype!=A && roundstate=2
triggerall= (p2bodydist x=[0,50]) && (p2bodydist y=[-50,50]) && p2statetype!=L && !(enemynear,hitfall)
triggerall= (enemynear,const(size.head.pos.y)<=-40) || (enemynear,statetype=A)
trigger1= ctrl && random<25
trigger2=prevstateno=205&& movehit

[State -1, SHP]
type=changestate
value=208
triggerall= var(59)>=1 && numenemy
triggerall= statetype!=A && roundstate=2
triggerall= (p2bodydist x=[0,46]) && (p2bodydist y=[-50,50]) && p2statetype!=L && !(enemynear,hitfall)
triggerall= (enemynear,const(size.head.pos.y)<=-40) || (enemynear,statetype=A)
triggerall= (enemynear,const(size.head.pos.y)<=-40) || (enemynear,statetype=A)
trigger1= ctrl && random<100
trigger2=prevstateno=205&&random<150

[State -1, SLK]
type=changestate
value=215
triggerall= var(59)>=1 && numenemy
triggerall= statetype!=A && roundstate=2
triggerall= (p2bodydist x=[0,59]) && (p2bodydist y=[-50,50]) && p2statetype!=L && p2statetype!=A && !(enemynear,hitfall) && !(enemynear,hitfall)
trigger1= ctrl && random<50

[State -1, SMK2]
type=changestate
value=220
triggerall= var(59)>=1 && numenemy
triggerall= statetype!=A && roundstate=2
triggerall= (p2bodydist x=[0,50]) && (p2bodydist y=[-50,50]) && p2statetype!=L && p2statetype!=C && !(enemynear,hitfall)
triggerall= (enemynear,const(size.head.pos.y)<=-40) || (enemynear,statetype=A)
trigger1= ctrl && random<33

[State -1, SMK]
type=changestate
value=220
triggerall= var(59)>=1 && numenemy
triggerall= statetype!=A && roundstate=2
triggerall= (p2bodydist x=[0,20]) && (p2bodydist y=[-50,50]) && p2statetype!=L && p2statetype!=C && !(enemynear,hitfall)
triggerall= (enemynear,const(size.head.pos.y)<=-40) || (enemynear,statetype=A)
trigger1= ctrl && random<75

[State -1, SHK]
type=changestate
value=225
triggerall= var(59)>=1 && numenemy
triggerall= statetype!=A && roundstate=2
triggerall= (p2bodydist x=[0,59]) && (p2bodydist y=[-50,50]) && p2statetype!=L && p2statetype!=C && !(enemynear,hitfall)
triggerall= (enemynear,const(size.head.pos.y)<=-40) || (enemynear,statetype=A)
trigger1= ctrl && random<100

[State -1, CLP]
type=changestate
value=230
triggerall= var(59)>=1 && numenemy
triggerall= statetype!=A && roundstate=2
triggerall= (p2bodydist x=[0,40]) && (p2bodydist y=[-50,50]) && p2statetype!=L && p2statetype!=A && !(enemynear,hitfall)
trigger1= ctrl && random<50
trigger2= stateno=200 && movehit && random<100

[State -1, CMP]
type=changestate
value=235
triggerall= var(59)>=1 && numenemy
triggerall= statetype!=A && roundstate=2
triggerall= (p2bodydist x=[0,45]) && (p2bodydist y=[-50,50]) && p2statetype!=L && p2statetype!=A && !(enemynear,hitfall)
trigger1= ctrl && random<75

[State -1, CHP]
type=changestate
value=240
triggerall= var(59)>=1 && numenemy
triggerall= statetype!=A && roundstate=2
triggerall= (p2bodydist x=[0,33]) && (p2bodydist y=[-50,50]) && p2statetype!=L && !(enemynear,hitfall)
triggerall= (enemynear,const(size.head.pos.y)<=-40) || (enemynear,statetype=A)
trigger1= ctrl && random<100

[State -1, CLK]
type=changestate
value=245
triggerall= var(59)>=1 && numenemy
triggerall= statetype!=A && roundstate=2
triggerall= (p2bodydist x=[0,54]) && (p2bodydist y=[-50,50]) && p2statetype!=L && p2statetype=S && !(enemynear,hitfall)
trigger1= ctrl && random<50

[State -1, CMK]
type=changestate
value=250
triggerall= var(59)>=1 && numenemy
triggerall= statetype!=A && roundstate=2
triggerall= (p2bodydist x=[0,62]) && (p2bodydist y=[-50,50]) && p2statetype!=L && p2statetype=S && !(enemynear,hitfall)
trigger1= ctrl && random<75

[State -1, CHK]
type=changestate
value=255
triggerall= var(59)>=1 && numenemy
triggerall= statetype!=A && roundstate=2
triggerall= (p2bodydist x=[0,56]) && (p2bodydist y=[-50,50]) && p2statetype!=L && p2statetype=S && !(enemynear,hitfall)
trigger1= ctrl && random<100

[State -1, ALP]
type=changestate
value=260
triggerall=var(59)>=1&&statetype=A&&roundstate=2
triggerall=(p2bodydist x=[0,84])&&(p2bodydist y=[-50,50])&&(p2statetype!=L)
trigger1=ctrl&&random<50

[State -1, AMP]
type=changestate
value=265
triggerall= var(59)>=1 && numenemy
triggerall= statetype=A && roundstate=2
triggerall= (p2bodydist x=[0,78]) && (p2bodydist y=[-50,50]) && p2statetype!=L && !(enemynear,hitfall)
trigger1= ctrl && random<ifelse((vel x>0 && p2statetype=A), 250, 75)

[State -1, AHP]
type=changestate
value=270
triggerall= var(59)>=1 && numenemy
triggerall= statetype=A && roundstate=2
triggerall= (p2bodydist x=[0,110]) && (p2bodydist y=[-50,50]) && p2statetype!=L && !(enemynear,hitfall)
trigger1= ctrl && random<100

[State -1, ALK]
type=changestate
value=275
triggerall= var(59)>=1 && numenemy
triggerall= statetype=A && roundstate=2
triggerall= (p2bodydist x=[0,70]) && (p2bodydist y=[-50,50]) && p2statetype!=L && !(enemynear,hitfall)
trigger1= ctrl && random<50

[State -1, AMK]
type=changestate
value=280
triggerall= var(59)>=1 && numenemy
triggerall= statetype=A && roundstate=2
triggerall= (p2bodydist x=[-50,130]) && (p2bodydist y=[-50,50]) && p2statetype!=L && !(enemynear,hitfall)
trigger1= ctrl && random<75

[State -1, AHK]
type=changestate
value=285
triggerall= var(59)>=1 && numenemy
triggerall= statetype=A && roundstate=2
triggerall= (p2bodydist x=[0,130]) && (p2bodydist y=[-50,50]) && p2statetype!=L && !(enemynear,hitfall)
trigger1= ctrl && random<100
